﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using AudioDjStudio;

namespace IntelliTouchMix
{
    public partial class OutputDevice : Form
    {
        public OutputDevice()
        {
            InitializeComponent();
        }

        private void buttonCancel_Click(object sender, EventArgs e)
        {
            m_iOutputDeviceA = (short)comboBoxPlayerA.SelectedIndex;
            m_iOutputDeviceB = (short)comboBoxPlayerB.SelectedIndex;

            DialogResult = DialogResult.OK;
            Close();
        }

        private void FormDevices_Load(object sender, System.EventArgs e)
        {
           
            DialogResult = DialogResult.Cancel;
            Close();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            int nOutputDevices = m_djStudio.GetOutputDevicesCount();
            for (short i = 0; i < nOutputDevices; i++)
            {
                comboBoxPlayerA.Items.Add(m_djStudio.GetOutputDeviceDesc(i));
                comboBoxPlayerB.Items.Add(m_djStudio.GetOutputDeviceDesc(i));
            }
            comboBoxPlayerA.SelectedIndex = 0;
            comboBoxPlayerB.SelectedIndex = 0;
        }

    }
}
